package physics.Collisions;

import common.Math3D;
import common.Position3D;

public class CullusionSphere {
	
	Position3D position = null;

	double radius = 1;

	
	public double getRadius() {
		return radius;
	}

	public void setRadius(double radius) {
		this.radius = radius;
	}

	public CullusionSphere(){}
	
	public CullusionSphere(Position3D position, double radius){
		this.position = position;
		this.radius = radius;
	}
	
	public boolean checkCollusion(CullusionSphere cullusionSphere){
		double dist = Math3D.getDistance(this.position.getCenter(), cullusionSphere.position.getCenter());
		return (dist <= (radius + cullusionSphere.radius));
	}
	public Position3D getPosition() {
		return position;
	}

	public void setPosition(Position3D position) {
		this.position = position;
	}
}
